package com.parktech.sun.domain.model.sunhz;

import javax.persistence.*;

/**
 * User: Think
 * Date: 11-1-12
 * Time: 下午1:31
 */
@Entity
public class ApplicationAttachment {
    private Long id;

    private String name;

    private Application application;

    public ApplicationAttachment() {
    }

    public ApplicationAttachment(String originalFilename) {
        name = originalFilename;
    }

    public ApplicationAttachment(String originalFilename, Application application) {
        name = originalFilename;
        this.application = application;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    @ManyToOne
    public Application getApplication() {
        return application;
    }

    public void setApplication(Application application) {
        this.application = application;
    }
}
